/*
 *  员工
 */

import { getRequest, postRequest } from '/@/lib/axios';

export const employeeApi = {
  /**
   * @description: 员工管理查询
   * @param {*}
   * @return {*}
   */
  queryEmployee: (params) => {
    return postRequest('/sys/user/searchUserPage', params);
  },
  /**
   * @description: 更新员工信息
   * @param {EmployeeUpdateDto} params
   * @return {*}
   */
  saveEmployee: (params) => {
    return postRequest('/sys/user/save', params);
  },
  /**
   * @description: 删除员工
   * @param {number} employeeId
   * @return {*}
   */
  deleteEmployee: (employeeId) => {
    return getRequest(`/sys/user/delete?userId=${employeeId}`);
  },
  /**
   * @description: 批量调整员工部门
   * @return {*}
   */
  batchUpdateDepartmentEmployee: (updateParam) => {
    return postRequest('/sys/user/batchModDept', updateParam);
  },
  /**
   * @description: 重置员工密码
   * @param {number} employeeId
   * @return {*}
   */
  resetPassword: (employeeId) => {
    return getRequest(`/sys/user/resetPassword?userId=${employeeId}`);
  },
  /**
   * @description: 修改面面
   * @param {number} employeeId
   * @return {*}
   */
  updateEmployeePassword: (param) => {
    return postRequest('/sys/user/updatePass',param);
  },
};
